home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / UCRASM25.ARJ / ADDSTR.ASM < prev    next >
Assembly Source File  |  1991-10-12  |  785b  |  49 lines

  1. StdGrp        group    stdlib,stddata
  2. stddata        segment    para public 'sldata'
  3. stddata        ends
  4. ;
  5. stdlib        segment    para public 'slcode'
  6.         assume    cs:stdgrp
  7. ;
  8. ;
  9. ; AddStr-    Unions into a set the characters in a string.
  10. ;
  11. ; inputs:
  12. ;
  13. ;    ES:DI-  Points at the set (at its mask byte).
  14. ;    DX:SI-    Points at the string.
  15. ;
  16. ;
  17. ;
  18.         public    sl_AddStr
  19. ;
  20. sl_AddStr    proc    far
  21.         push    ds
  22.         push    ax
  23.         push    bx
  24.         push    si
  25.                 push    di
  26. ;
  27.         mov    ds, dx
  28.         mov    al, es:[di]        ;Get mask byte
  29.         add    di, 8            ;Skip to start of set
  30.         mov    bh, 0
  31.                 jmp    IntoLp
  32. BldLp:        or    es:[di][bx], al        ;Add to set
  33.         inc    si            ;Move on to next char.
  34. IntoLp:        mov    bl, [si]
  35.         cmp    bl, 0
  36.         jnz    BldLp
  37. ;
  38.         pop    di
  39.         pop    si
  40.         pop    bx
  41.         pop    ax
  42.         pop    ds
  43.         ret
  44. sl_AddStr    endp
  45. ;
  46. ;
  47. stdlib        ends
  48.         end
  49.